import {req_get, req_post, req_delete, req_put} from './../cssdrequest';
import {OfficeDto} from "@/type/dto/OfficeDto";
import {LoginDto} from "@/type/dto/LoginDto";
import {R} from "@/type/dto/R";
import {QtBankVO} from "@/type/vo/QtBankVO";
import {RP} from "@/type/dto/RP";
import {ExamUserInfoVO} from "@/type/vo/ExamUserInfoVO";
import {ExamVO} from "@/type/vo/ExamVO";
import {types} from "sass";
import List = types.List;
import {ExamRecordUserAnswerVo} from "@/type/vo/ExamRecordUserAnswerVo";

export async function api_pageExamUserInfo(examId: string, officeCode: string, page: number, limit: number) {
    const data = await req_get('/publish/answer_user', {
        examId,
        officeCode,
        page,
        limit
    });
    //转成我要的json
    console.log('data:', data);
    return JSON.parse(data) as R<RP<ExamUserInfoVO>>;
}

//http.SetGetData(new { examId = examId, userId = userId }).SetBaseUri(KPIData.ServerURL).SetUrl($"/publish/exam_user");
export async function api_pageExamUserDetailInfo(examId: string, userId: string) {
    const data = await req_get('/publish/exam_user', {
        examId,
        userId
    });
    //转成我要的json
    console.log('data:', data);
    return JSON.parse(data) as R<ExamRecordUserAnswerVo>;
}